package com.hmsm.server.common;

import java.util.List;

import com.hmsm.sys.service.DeptInfoService;
import com.hmsm.sys.service.LogInfoService;
import com.hmsm.sys.service.RoleInfoService;
import com.hmsm.sys.service.SysConfigService;
import com.hmsm.sys.service.SysMessagePublishInfoService;
import com.hmsm.sys.service.UserInfoService;
import com.hmsm.sys.service.UserOrgService;
import com.hmsm.sys.service.UserRoleService;
import com.opensymphony.xwork2.ActionSupport;

/**
 * 管理spinrg逻辑类
 * 
 * @author admin
 * 
 */
@SuppressWarnings("serial")
public class AppContextService extends ActionSupport{
	// 系统默认配置Service
	public static SysConfigService getSysConfigService() {
		return (SysConfigService) AllContext.getBeanService(SysConfigService.class);
	}
	//系统日志
	public static LogInfoService getLogInfoService(){
		return (LogInfoService) AllContext.getBeanService(LogInfoService.class);
	}
	//用户
	public static UserInfoService getUserInfoService(){
		return (UserInfoService) AllContext.getBeanService(UserInfoService.class);
	}
	//部门
	public static DeptInfoService getDeptInfoService(){
		return (DeptInfoService) AllContext.getBeanService(DeptInfoService.class);
	}
	//用户机构
	public static UserOrgService getUserOrgService(){
		return (UserOrgService) AllContext.getBeanService(UserOrgService.class);
	}
	//角色管理
	public static RoleInfoService getRoleInfoService(){
		return (RoleInfoService) AllContext.getBeanService(RoleInfoService.class);
	}
	//消息管理
	public static SysMessagePublishInfoService getSysMessagePublishInfoService(){
		return (SysMessagePublishInfoService) AllContext.getBeanService(SysMessagePublishInfoService.class);
	}
	
	public static List<?> findServicesBy(Class<?> class1) {
		return AllContext.findServicesBy(class1);
	}
	
}
